package com.ruoyi.controller;

import java.util.List;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.system.service.ISysUserService;

/**
 * 派稿人员选择
 */
@RestController
@RequestMapping("dispatcher")
public class DispatchManuscriptsPersonSelectController extends BaseController{

	private ISysUserService service;
	
	
	public DispatchManuscriptsPersonSelectController(ISysUserService service) {
		this.service = service;
	}
	@PreAuthorize("@ss.hasPermi('order:order:selecteProcess')")
	@GetMapping("listPerson")
	public TableDataInfo listPerson(SysUser sysUser) {
		
		PageUtils.startPage();
		
		// 获取 编辑角色下的用户
		// 编辑角色
		sysUser.setRoleId(103L);
		
		List<SysUser> selectAllocatedList = service.selectAllocatedList(sysUser);
		
		return getDataTable(selectAllocatedList);
		
	}
}
